﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using HMIS.FrameWork.Repository;
using HMIS.FrameWork.DomainBase;
using HMIS.Infrastructure.Core.Authority;

namespace HMIS.Infrastructure.Core.Repositories
{
    public interface IHospUserRepository : IRepository<HospUser>
    {
        bool IsFieldExist(string fieldName, string fieldValue, string id);
        bool Validate(string loginName, string pwd);
        bool ValidateById(string userId, string pwd);
		
		HospUser GetById(string id);
		HospUser GetByIdWithMenu(string id);
        HospUser GetByName(string loginName);

		IList<HospUser> GetPlistAll(int start, int limit, string sort, string dir, List<DataFilter> filters, out long total);
		IList<HospUser> GetListByRoleCode(string roleCode, string sort, string dir);
		IList<HospUser> QueryPList(string query, int start, int limit, string sort, string dir, List<DataFilter> filters, out long total);

		IList<object[]> GetUserListByDep(string query, string depCode, int start, int limit, string sort, string dir, List<DataFilter> filters, out long total);
		IList<HospUser> GetUserListByRoleAndDep(string query, string roleCode, string depCode, int start, int limit, string sort, string dir, List<DataFilter> filters, out long total);

		IList<HospUser> GetPlist(int start, int limit, string sort, string dir, List<DataFilter> filters, out long total);
	}
}
